package com.example.mvn.demo.controller;

import com.example.mvn.demo.annotions.RewriteController;
import com.example.mvn.demo.annotions.RewriteMapping;
import com.example.mvn.demo.dao.UserDao;
import com.example.mvn.demo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author zooty
 */
@RewriteController
public class MyFoobar extends TestController {
    @Autowired
    private UserDao userDao;

    @Override
    public Integer helloWorld() {
        User user = new User(null, "123");
        return userDao.create(user);
    }
}